import datetime


def addLog(text, *args):
    # 获取当前日期和时间
    now = datetime.datetime.now()
    # 格式化日期和时间
    formatted_date = now.strftime("%Y-%m-%d")
    formatted_time = now.strftime("%H:%M:%S")
    f = open("./logs/" + formatted_date + ".txt", "a")
    text = "[" + formatted_time + "] " + text + "\n"
    f.write(text)
    for it in args:
        f.write("       -| " + str(it) + "\n")
